import { ApiProperty } from "@nestjs/swagger";
import { IsDate, IsDateString, IsNotEmpty, IsNumber, IsString, Max, MaxLength, Min } from "class-validator";

export class DailyRoutineDto {
  @ApiProperty({ description: "日期" })
  @IsNotEmpty({ message: "日期不能为空" })
  @IsString()
  date: string;

  @ApiProperty({ description: "完成度", type: Number })
  @IsNotEmpty({ message: "完成度不能为空" })
  @IsNumber({}, { message: "完成度必须是数字" })
  @Min(0)
  @Max(100)
  value: number;
}
